package top.txl.mapper;

import org.apache.ibatis.annotations.Mapper;

import top.txl.entity.ShoppingCart;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    void addCart(ShoppingCart cart);

    ShoppingCart findCartList(Integer userId,Integer dishId,Integer setmealId);

    void updateCartListsNumber(Integer userId,Integer dishId,Integer number);
    void updateCartListsNumberBySId(Integer userId, Integer sId, Integer number);
    void updateCartListsDeletedDishId(Integer userId,List<Integer> ids,Integer deleted);
    void updateCartListsDeletedSetmealId(Integer userId,List<Integer> ids,Integer deleted);

    List<ShoppingCart> getCartLists(Integer userId);

    ShoppingCart findCartListByDishId(Integer userId, Integer dishId);

    ShoppingCart findCartListBySetmealId(Integer userId, Integer setmealId);


    void deletedAllCartListsByUserId(Integer userId);

}
